home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / print / pdfepson.arj / EPSONESC.DOC next >
Text File  |  1994-04-13  |  3KB  |  66 lines

  1. {Epson printers have a command set called the ESC/P set.  This command set
  2. can do many things, the most useful of which are in the unit below.  Note that
  3. several of these commands, such as the Epson Roman T font, require the newer
  4. ESC/P 2 command set.  These won't work at all with the older printers, but the
  5. other commands will.  Usage for the commands comes after their declarations.}
  6. {Epson is a registered trademark of Epson America, Inc.}
  7.  
  8. unit EpsonESC;
  9.  
  10. interface
  11.  
  12. uses Printer;
  13.  
  14. const  Roman = #0;        {font values for SetFont}
  15.              SansSerif = #1;
  16.        Courier = #2;
  17.        Prestige = #3;
  18.        Script = #4;
  19.        RomanT = #10;
  20.        SansSerifH = #11;
  21.        On = True;        {values for the Turn commands}
  22.        Off = False;
  23.  
  24.   procedure GiveESCCommand (Command : String);  {gives a command with the
  25.   ESC included.  To use this command, for example, to do an initialization,
  26.   include the command:  GiveESCCommand('@');
  27.   The Epson initialization code will be sent to the printer.}
  28.  
  29.   procedure SetFont (Font : String);  {Chooses font.  To use this command,
  30.   include the following in your program:  SetFont(Roman);
  31.   The valid fonts are shown above.  Keep in mind that you don't need to use
  32.   the numbers because the constants take care of that.  You just have to use
  33.   the names of the fonts.  Roman T and Sans Serif H are P 2 only.}
  34.  
  35.   procedure Initialize;    {initializes printer.  Takes no parameters; does
  36.   a simple initialization of the printer.}
  37.  
  38.   procedure FormFeed;  {commands printer to Form Feed.  Moves the paper to the
  39.   top of next page.}
  40.  
  41.   procedure TurnItalic (OnOrOff : boolean);  {turns italics on or off. Use
  42.   the command: TurnItalic(On);
  43.   you can also use off.}
  44.  
  45.   procedure TurnBold (OnOrOff : boolean);  {turns bold on or off. Use like
  46.   TurnItalic, above.}
  47.  
  48. {All of the following are used like TurnItalic, above.}
  49.  
  50.   procedure TurnCondensed (OnOrOff : boolean);  {turns condensed on or off}
  51.   procedure TurnDoubleWidth (OnOrOff : boolean); {turns double-width on or off}
  52.   procedure TurnUnderline (OnOrOff : boolean);  {turns underline on or off}
  53.  
  54.   implementation
  55. {Remainder of source code available for $5 plus $2 shipping and handling.
  56. Out-of-US orders require $5 shipping and handling.  Those who order will also
  57. recieve notices of improvements, which will come because I use this unit too,
  58. and can see several possible future improvements.  If they send back these
  59. notices with postage ($2 US & $5 foreign) they will recieve the latest version
  60. complete with all source code.  Send all orders to:
  61.  
  62. Tim Hurley
  63. RR1 Box 168P
  64. Bay City, TX
  65.     77414}
  66.